//package org.example.pay;
//
//import com.egzosn.pay.common.bean.PayOrder;
//import org.rcy.framework.pay.config.ali.AliPayServiceWrapper;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//import javax.servlet.http.HttpServletResponse;
//import java.io.IOException;
//import java.math.BigDecimal;
//import java.util.Map;
//import java.util.UUID;
//
//@RestController
//public class TestPayController {
//    @Autowired
//    private AliPayServiceWrapper aliPayService;
//
//    public TestPayController() {
//    }
//
//    @RequestMapping(
//        value = {"/initpay"}
//    )
//    public Object toPay(HttpServletResponse response) throws IOException {
//        PayOrder order = new PayOrder("订单title", "摘要", new BigDecimal(0.01), UUID.randomUUID().toString().replace("-", ""));
//        Map<String, Object> map = aliPayService.buildPayRequest(order, "PAGE");
//        Object result = map.get("result");
//        String produces = (String)map.get("produces");
//        response.setContentType(produces);
////        try (ServletOutputStream outputStream = response.getOutputStream();){
////            outputStream.
////        }catch (Exception e){
////
////        }
//        return result;
//    }
//}